﻿using System;

namespace MessagePack.Decoders
{
	// Token: 0x02000081 RID: 129
	internal class InvalidByte : IByteDecoder
	{
		// Token: 0x06000240 RID: 576 RVA: 0x0000B28E File Offset: 0x0000968E
		private InvalidByte()
		{
		}

		// Token: 0x06000241 RID: 577 RVA: 0x0000B296 File Offset: 0x00009696
		public byte Read(byte[] bytes, int offset, out int readSize)
		{
			throw new InvalidOperationException(string.Format("code is invalid. code:{0} format:{1}", bytes[offset], MessagePackCode.ToFormatName(bytes[offset])));
		}

		// Token: 0x040000A9 RID: 169
		internal static readonly IByteDecoder Instance = new InvalidByte();
	}
}
